/**
 * Copyright (c) 2018, ShangHai HOWBUY INVESTMENT MANAGEMENT Co., Ltd.
 * All right reserved.
 * <p>
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF HOWBUY INVESTMENT
 * MANAGEMENT CO., LTD.  THE CONTENTS OF THIS FILE MAY NOT BE DISCLOSED
 * TO THIRD PARTIES, COPIED OR DUPLICATED IN ANY FORM, IN WHOLE OR IN PART,
 * WITHOUT THE PRIOR WRITTEN PERMISSION OF HOWBUY INVESTMENT MANAGEMENT
 * CO., LTD.
 */
package com.howbuy.tms.web.service;

import com.netflix.discovery.converters.Auto;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @description:( 请在此添加描述)
 * @author hongdong.xie
 * @date 2018/12/24 15:56
 * @since JDK 1.7
 */
@Service
public class HystrixQueryService {
    @Autowired
    private QueryService queryService;

    @HystrixCommand(fallbackMethod = "queryFallback")
    public Map<String,String> query(){
        return queryService.query();
    }

    public Map<String,String> queryFallback(){
        Map<String,String> map = new HashMap<>();
        map.put("id","fallback.");
        return map;
    }
}
